<!DOCTYPE html>
<html >
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>旋转</title>
    <style>
        .box{
            margin: 50px auto;
            width: 200px;
            height: 200px;
            background-color: red;
            transition: all 2s;
        }
        .box:hover{
            transform: rotate(60deg);
            background-color: royalblue;
            border-radius: 50%;
        }
        .box1{
            margin: 50px auto;
            width: 0;
            height: 0;
            border: 50px solid white;
            border-bottom-color: red;
            border-top-width: 0;
            transition: all 0.2s;
        }
        .box1:hover{
            transform: rotate(180deg);
        }
    </style>
</head>
<body>
    <div class="box"></div>
    <div class="box1"></div>
</body>
</html>